/* ---------------------------------------------------------------------------------------------------------------------
 * File: database.h
 * Author: Joe Huang
 * Purpose: This was an attempt at having a centralized database. However due to time constraints this was never
 *          completed and was not used in the app
 * ---------------------------------------------------------------------------------------------------------------------*/

#include <QObject>
#include <QtSql>
#include "player.h"

#ifndef DATABASE_H
#define DATABASE_H

class database
{
public:
    database();

public:
    bool openPlayerDatabase();
    void closePlayerDatabase();
    void insertPlayer(int Identifier, QString firstName, QString middleName, QString lastName, int jerseyNumber);
    void insertPlayer(Player p);
    void printAllPlayers(); //For debugging purposes

private:
    QSqlDatabase playerDatabaseConnection;
    QSqlQuery query;
    QSqlRecord record;
};

#endif // DATABASE_H
